

export default url => {
    const getPage = (req) => window.$axios({
        url: `${url}/page`,
        method: 'get',
        params:req
    })
    
    const remove = (categoryId,keepTime) => window.$axios({
        url: `${url}/${categoryId}/${keepTime}`,
        method: 'delete',
    })

    const visit = (data) => window.$axios({
        url: `${url}`,
        method: 'post',
        data
    })
    //系统管理员日志
    const getAdminPage = (req) => window.$axios({
        url: `${url}/adminpage`,
        method: 'get',
        params:req
    })
    //安全管理员日志
    const getSecurePage = (req) => window.$axios({
        url: `${url}/securepage`,
        method: 'get',
        params:req
    })
    //审计员日志
    const getAuditPage = (req) => window.$axios({
        url: `${url}/auditpage`,
        method: 'get',
        params:req
    })
    //用户日志
    const getMyPage = (req) => window.$axios({
        url: `${url}/my/page`,
        method: 'get',
        params:req
    })
    
    return {
        getPage,
        remove,
        visit,
        getAdminPage,
        getSecurePage,
        getAuditPage,
        getMyPage
    }
}